#!/bin/bash
export HOMEDIR=$(dirname $(dirname $(readlink -f "${BASH_SOURCE[0]}")))
source $HOMEDIR/scripts/init-env.sh
yum install make -y
yum localinstall $HOMEDIR/dependencies/*`arch`.rpm $HOMEDIR/dependencies/*noarch.rpm --skip-broken -y
tar -xf $HOMEDIR/$pkg_ptk -C $HOMEDIR/workspace/ptk
cp -rf $HOMEDIR/workspace/ptk/ptk /usr/local/bin/
ptk checkos -f $HOMEDIR/config/install-config.yaml
(
 find . -name 'root_fix*.sh' -print0 | while IFS= read -r -d '' file; do
    source "$file"
 done
)
ptk checkos -f $HOMEDIR/config/install-config.yaml
